/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.me.entityBeans;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Administrador
 */
@Entity
@Table(name = "T_MONTO_INTERES")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "TMontoInteres.findAll", query = "SELECT t FROM TMontoInteres t"),
    @NamedQuery(name = "TMontoInteres.findByNIdMontoInteresPk", query = "SELECT t FROM TMontoInteres t WHERE t.nIdMontoInteresPk = :nIdMontoInteresPk"),
    @NamedQuery(name = "TMontoInteres.findByNMontoInferior", query = "SELECT t FROM TMontoInteres t WHERE t.nMontoInferior = :nMontoInferior"),
    @NamedQuery(name = "TMontoInteres.findByNMontoSuperior", query = "SELECT t FROM TMontoInteres t WHERE t.nMontoSuperior = :nMontoSuperior"),
    @NamedQuery(name = "TMontoInteres.findByNInteresMensual", query = "SELECT t FROM TMontoInteres t WHERE t.nInteresMensual = :nInteresMensual"),
    @NamedQuery(name = "TMontoInteres.findByNMontoPrestamo", query = "SELECT t FROM TMontoInteres t WHERE t.nMontoSuperior >= :nMontoPrestamo "
                                                                                                           + " AND t.nMontoInferior <= :nMontoPrestamo "),
    @NamedQuery(name = "TMontoInteres.findByNInteresQuincenal", query = "SELECT t FROM TMontoInteres t WHERE t.nInteresQuincenal = :nInteresQuincenal")})
public class TMontoInteres implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "N_ID_MONTO_INTERES_PK")
    private Short nIdMontoInteresPk;
    @Basic(optional = false)
    @Column(name = "N_MONTO_INFERIOR")
    //private int nMontoInferior;
    private BigDecimal nMontoInferior;
    @Basic(optional = false)
    @Column(name = "N_MONTO_SUPERIOR")
    //private int nMontoSuperior;
    private BigDecimal nMontoSuperior;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Basic(optional = false)
    @Column(name = "N_INTERES_MENSUAL")
    private BigDecimal nInteresMensual;
    @Basic(optional = false)
    @Column(name = "N_INTERES_QUINCENAL")
    private BigDecimal nInteresQuincenal;

    public TMontoInteres() {
    }

    public TMontoInteres(Short nIdMontoInteresPk) {
        this.nIdMontoInteresPk = nIdMontoInteresPk;
    }

    public TMontoInteres(Short nIdMontoInteresPk, BigDecimal nMontoInferior, BigDecimal nMontoSuperior, BigDecimal nInteresMensual, BigDecimal nInteresQuincenal) {
        this.nIdMontoInteresPk = nIdMontoInteresPk;
        this.nMontoInferior = nMontoInferior;
        this.nMontoSuperior = nMontoSuperior;
        this.nInteresMensual = nInteresMensual;
        this.nInteresQuincenal = nInteresQuincenal;
    }

    public Short getNIdMontoInteresPk() {
        return nIdMontoInteresPk;
    }

    public void setNIdMontoInteresPk(Short nIdMontoInteresPk) {
        this.nIdMontoInteresPk = nIdMontoInteresPk;
    }

    public BigDecimal getNMontoInferior() {
        return nMontoInferior;
    }

    public void setNMontoInferior(BigDecimal nMontoInferior) {
        this.nMontoInferior = nMontoInferior;
    }

    public BigDecimal getNMontoSuperior() {
        return nMontoSuperior;
    }

    public void setNMontoSuperior(BigDecimal nMontoSuperior) {
        this.nMontoSuperior = nMontoSuperior;
    }

    public BigDecimal getNInteresMensual() {
        return nInteresMensual;
    }

    public void setNInteresMensual(BigDecimal nInteresMensual) {
        this.nInteresMensual = nInteresMensual;
    }

    public BigDecimal getNInteresQuincenal() {
        return nInteresQuincenal;
    }

    public void setNInteresQuincenal(BigDecimal nInteresQuincenal) {
        this.nInteresQuincenal = nInteresQuincenal;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nIdMontoInteresPk != null ? nIdMontoInteresPk.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TMontoInteres)) {
            return false;
        }
        TMontoInteres other = (TMontoInteres) object;
        if ((this.nIdMontoInteresPk == null && other.nIdMontoInteresPk != null) || (this.nIdMontoInteresPk != null && !this.nIdMontoInteresPk.equals(other.nIdMontoInteresPk))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.me.entityBeans.TMontoInteres[ nIdMontoInteresPk=" + nIdMontoInteresPk + " ]";
    }
    
}
